package service.impl;

import dao.PowerBatteryDao;
import dao.impl.PowerBatterDaoImpl;
import entity.PoweBattery;
import service.PowerBatteryService;

import java.util.List;

public class PowerBatteryServiceImpl implements PowerBatteryService {
    PowerBatteryDao powerbatteryDao = new PowerBatterDaoImpl();
    @Override
    public List<PoweBattery> powSelect() {
        return powerbatteryDao.selectAll();
    }

    @Override
    public PoweBattery selectThis(int id) {
        return powerbatteryDao.selectThis(id);
    }

    @Override
    public boolean selectUpdate(PoweBattery powerbattery) {
        return powerbatteryDao.selectUpdate(powerbattery) > 0;
    }

    @Override
    public boolean delete(int id) {
        return powerbatteryDao.delete(id) > 0;
    }
}
